package main

// 修改 personex1.go，使它的参数 upPerson 不是一个指针，解释下二者的区别。

import (
	"fmt"
	"strings"
)

type Person struct {
	firstName string
	lastName  string
}

func upPerson(p Person) {
	p.firstName = strings.ToUpper(p.firstName)
	p.lastName = strings.ToUpper(p.lastName)
}

func main() {
	var per1 = &Person{"han", "meimei"}
	upPerson(*per1)
	fmt.Println("per1 name: ", *per1)
	// out per1 name:  {han meimei}
	// diffrent: in the func upPersion, the params p is a copy of per1, change p doest not effect per1
}
